<template>
  <div>
    <div class="list-item" v-for="(item, index) in list" :key="index">
      <div class="item-name">
        <span class="span">{{item.name}}</span>
      </div>
      <div v-if="item.children" class="children-item">
        <list :list="item.children"></list>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "List",
  props: {
    list: Array
  }
};
</script>
<style scoped>

.list-item {
  margin-left: 50px;
}

.children-item {
  margin-left: 50px;
}
.span{
    border-left:1px solid lightblue;
    display: inline-block;
    padding: 3px 10px;
    margin-bottom: 5px;
}

</style>